package demo.hashset;

import javafx.beans.value.ObservableObjectValue;

import java.util.HashSet;

/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-22
 */
public class Main {
    public static void main(String[] args) {
/*        HashSet<Employee> set = new HashSet<Employee>();

        set.add(new Employee("张三",18));
        set.add(new Employee("张三",16));
        set.add(new Employee("李四",18));
        set.add(new Employee("张三",18));

        for (Object o : set) {
            System.out.println(o);
        }*/
        HashSet<EmployeeHigh> set = new HashSet<EmployeeHigh>();

        set.add(new EmployeeHigh("张三", 5000, new MyDate(2000,1,1)));
        set.add(new EmployeeHigh("张三", 10000, new MyDate(2000,1,1)));
        set.add(new EmployeeHigh("张三", 5000, new MyDate(1990,1,1)));
        set.add(new EmployeeHigh("李四", 5000, new MyDate(2000,1,1)));

        for (Object o : set) {
            System.out.println(o);
        }
    }
}

